#pragma once
#include "game.h"
#include "mydrawengine.h"
#include "gamecode.h"
#include "buttons.h"
#include "PopUps.h"
#include "Shapes.h"

struct Apple
{
	Image apple;

	Vector2D apple_Position;
	Vector2D apple_Size;
	Vector2D apple_Velocity;

	bool isActive;
};

struct spawnZone
{
	Circle2D theZone;

	int zoneTimer;
};

class AppleDropGame : public Game			// aaa
{
	static const int maxApples = 10;
	Apple apples[maxApples];

	spawnZone theZones[4];

	Image backdrop;
	Image catcher;

	Vector2D catcher_Position;
	Vector2D catcher_Velocity;
	Vector2D catcher_Size;

	Button startButton;
	Button endButton;						

	int timer;
	int score;
	int highScore;
	int timeTillNextSpawn;
	bool spawnNew;

	static const int appleScore = 20;
	static const int dropPenalty = 10;

	currentState theState;



public:										// aaa

	void GameInit();					    // aaa
	void GameMain();					    // aaa
	void GameShutdown();					// aaa
	GameResult GetResult();					// aaa

	void theGameLoop();

};

Game* GetAppledropGame();					// aaa